package com.itheima.d07;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Slf4j
public class Test {
//    static Logger log = LoggerFactory.getLogger(Test.class);

    public static void chu(int a, int b) {
//        System.out.println("\t除法操作："+a);
        log.info("除法操作：" + a);
//        System.out.println("\t除法操作："+b);
        log.info("除法操作：" + b);
        int c = a / b;
//        System.out.println("\t除法结果："+c);
        log.info("除法结果：" + c);

    }

    public static void main(String[] args) {
        try {
//            System.out.println("正在进行除法操作");
            log.info("正在进行除法操作");
            chu(10, 5);

        } catch (Exception e) {
//            System.out.println("出现了异常");
            log.error("出现了异常");
            throw new RuntimeException(e);
        }
    }
}
